package com.yzc.model.DTO;

import jakarta.validation.constraints.DecimalMin;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;

@Data
public class AttractionOrderDetail {
    @NotNull(message = "景点ID不能为空")
    private Long attractionId;

    @NotNull(message = "游玩日期不能为空")
    private Date visitDate;

    @NotBlank(message = "门票类型不能为空")
    private String ticketType;

    @NotNull(message = "门票数量不能为空")
    @Min(value = 1, message = "门票数量至少1张")
    private Integer ticketCount;

    @NotNull(message = "用户ID不能为空")
    private Long userId;

    @NotNull(message = "总金额不能为空")
    @DecimalMin(value = "0.01", message = "金额必须大于0")
    private BigDecimal totalAmount;
}